money = 10000
time = 1
while money < 20000:
    money = money + time*365*0.05
    time = time +1
    print(f"第{time}年的本金加利息为：{money}")
else:
    print(f"总金额变为两万需要{time}年")
